// packageA/mycomponent/goodsComponent/plugin/relation/relation.js
const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    info: {
      type: null,
      value: null
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    tapVideo(e) {
      console.log(e)
      wx.navigateTo({
        url: '/packageC/video_goods/VideoList/VideoList',
      })
    },
    toArticle(e) {
      let id = e.currentTarget.dataset.id;
      let is_audio = e.currentTarget.dataset.is_audio;
      if(is_audio){
        wx.navigateTo({
          url: '/packageA/member/course/VoiceDetail/VoiceDetail?article_id=' + id,
        })
      }else{
        wx.navigateTo({
          url: '/packageA/member/article/articleContent/articleContent?article_id=' + id,
        })
      }
      
    },
    toVideo(e) {
      let id = e.currentTarget.dataset.id;
      wx.navigateTo({
        url: '/packageC/video_goods/VideoDetail/VideoDetail?vid=' + id,
      })
    }
  }
})